package com.imooc.miaosha.dao;

import com.imooc.miaosha.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDao {

	@Select("select * from user where id = #{id}")
	User selectById(@Param("id") int id);

	@Insert("Insert into user(name) values(#{name})")
	int insert(User user);
}
